package com.hippo.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName SysTask
 * @Description TODO 系统定时任务
 * @Author tangxl
 * @create 2023-04-28 14:52
 **/
@Data
@Schema(name = "系统定时任务")
@TableName("sys_task")
public class SysTask implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(name = "主键ID", example = "1")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;
    @Schema(name = "任务编码-唯一", example = "code")
    @TableField("code")
    private String code;
    @Schema(name = "任务名称", example = "定时任务")
    @TableField("name")
    private String name;
    @Schema(name = "触发条件", example = "0/5 * * * * ?")
    @TableField("cron")
    private String cron;
    @Schema(name = "任务备注", example = "定时任务")
    @TableField("remark")
    private String remark;
    @Schema(name = "创建时间", example = "2021-04-28 14:55:00")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @Schema(name = "更新时间", example = "2021-04-28 14:55:00")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @Schema(name = "状态", example = "1")
    @TableField(value = "status", fill = FieldFill.INSERT)
    private String status;
}
